package shapes;

import java.awt.Color;
import java.awt.Graphics;

public class Poligono extends Shape {

	
	public Poligono(double[][] p, Color c, String n, Boolean s) {
		this.pts = p;
		
		double xMax = pts[0][0];
		double xMin = pts[0][0];
		double yMax = pts[1][0];
		double yMin = pts[1][0];
		for (int i = 1; i < pts[0].length; i++) {
			xMax = Math.max(pts[0][i], xMax);
			xMin = Math.min(pts[0][i], xMin);
			yMax = Math.max(pts[1][i], yMax);
			yMin = Math.min(pts[1][i], yMin);
		}
		center[0] = (xMin + xMax) / 2;
		center[1] = (yMin + yMax) / 2;
		type = 2;
		this.color = c;
		this.name = n;
		this.solid = s;
	}

}
